package eva.savant.business.compras.view

import eva.savant.businessobject.cm.Comprador
import eva.savant.businessobject.gl.Persona
import eva.savant.core.view.Maestro

import javax.faces.bean.ManagedBean
import javax.faces.bean.SessionScoped
import javax.annotation.PostConstruct
import javax.faces.convert.Converter

@SessionScoped
@ManagedBean(name = 'IMComprador')
public class IMComprador extends Maestro {

  @PostConstruct
  public void cleanEntity() {

    entity= new Comprador(); init()

    entity.persona= new Persona()
  }

  public List complete(String value) { return completeLike(Persona.class,'nombre',value) }

  public Converter getConverter() { return converterLike(Persona.class) }

}